package com.yyfax.pay.third.model.to.fuioudeposit;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.yyfax.framework.model.BasePO;
import com.yyfax.pay.common.util.XmlUtil;
import com.yyfax.pay.third.model.to.fuiou.ProtocolPlaceOrderRetryFuiouContent;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * 富友存管转账充值查询结果响应xml实体
 *
 * @author wujiande
 * @date 2018-05-22 10:59:51
 * @since v2.1.7
 */
@SuppressWarnings("serial")
@XStreamAlias("ap")
public class QueryTransferChargeResultXMLRsp extends BasePO {

	private Plain plain;

	@XStreamAlias("signature")
	private String sign;

	public Plain getPlain() {
		return plain;
	}

	public void setPlain(Plain plain) {
		this.plain = plain;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	/**
	 * XML字符串转换成实体{@link ProtocolPlaceOrderRetryFuiouContent}
	 *
	 * @author wujiande
	 * @date 2018-05-24 15:53:12
	 * @since v2.1.7
	 *
	 * @param xml
	 * @return 返回{@link ProtocolPlaceOrderRetryFuiouContent}
	 */
	public static QueryTransferChargeResultXMLRsp fromXml(String xml) {
		return XmlUtil.fromXMLForXStream(xml, "ap", QueryTransferChargeResultXMLRsp.class, "plain", Plain.class);
	}

	@XStreamAlias("plain")
	public class Plain {
		/** 返回码 */
		@XStreamAlias("resp_code")
		private String respCode;
		/** 返回描述 */
		@XStreamAlias("resp_msg")
		private String respMsg;
		/** 商户代码 */
		@XStreamAlias("mchnt_cd")
		private String merchantId;
		/** 流水号 */
		@XStreamAlias("mchnt_txn_ssn")
		private String serailNo;
		/** 总记录数 */
		@XStreamAlias("total_number")
		private String totalNumber;
		/** 查询结果 */
		@XStreamAlias("results")
		private List<QueryRst> results;

		public String getRespCode() {
			return respCode;
		}

		public void setRespCode(String respCode) {
			this.respCode = respCode;
		}

		public String getRespMsg() {
			return respMsg;
		}

		public void setRespMsg(String respMsg) {
			this.respMsg = respMsg;
		}

		public String getMerchantId() {
			return merchantId;
		}

		public void setMerchantId(String merchantId) {
			this.merchantId = merchantId;
		}

		public String getSerailNo() {
			return serailNo;
		}

		public void setSerailNo(String serailNo) {
			this.serailNo = serailNo;
		}

		public String getTotalNumber() {
			return totalNumber;
		}

		public void setTotalNumber(String totalNumber) {
			this.totalNumber = totalNumber;
		}

		public List<QueryRst> getResults() {
			return results;
		}

		public void setResults(List<QueryRst> results) {
			this.results = results;
		}
	}

	/**
	 * 转账充值查询结果
	 * 
	 * @author heizq
	 * @date 2017-09-09 14:33:18
	 * @since v1.0.0
	 */
	@XStreamAlias("result")
	public class QueryRst {

		/** 原交易流水 */
		@XStreamAlias("src_txn_ssn")
		private String busiId;
		/** 记账流水号 */
		@XStreamAlias("dest_rsp_ssn")
		private String destRspSsn;
		/** 交易时间 */
		@XStreamAlias("src_txn_dt")
		private String tradeDate;
		/** 入账时间 */
		@XStreamAlias("dest_txn_dt")
		private String receiptTime;
		/** 户名 */
		@XStreamAlias("acnt_nm")
		private String accountName;
		/** 卡号 */
		@XStreamAlias("acnt_no")
		private String accountNo;
		/** 金额 */
		@XStreamAlias("txn_amt")
		private Long amount;
		/** 充值码 */
		@XStreamAlias("chg_cd")
		private String chargeCode;
		/** 状态 */
		@XStreamAlias("txn_status")
		private String status;
		/** 充值备注信息 */
		@XStreamAlias("rem")
		private String remark;

		public String getBusiId() {
			return busiId;
		}

		public void setBusiId(String busiId) {
			this.busiId = busiId;
		}

		public String getDestRspSsn() {
			return destRspSsn;
		}

		public void setDestRspSsn(String destRspSsn) {
			this.destRspSsn = destRspSsn;
		}

		public String getTradeDate() {
			return tradeDate;
		}

		public void setTradeDate(String tradeDate) {
			this.tradeDate = tradeDate;
		}

		public String getReceiptTime() {
			return receiptTime;
		}

		public void setReceiptTime(String receiptTime) {
			this.receiptTime = receiptTime;
		}

		public String getAccountName() {
			return accountName;
		}

		public void setAccountName(String accountName) {
			this.accountName = accountName;
		}

		public String getAccountNo() {
			return accountNo;
		}

		public void setAccountNo(String accountNo) {
			this.accountNo = accountNo;
		}

		public Long getAmount() {
			return amount;
		}

		public void setAmount(Long amount) {
			this.amount = amount;
		}

		public String getChargeCode() {
			return chargeCode;
		}

		public void setChargeCode(String chargeCode) {
			this.chargeCode = chargeCode;
		}

		public String getStatus() {
			return status;
		}

		public void setStatus(String status) {
			this.status = status;
		}

		public String getRemark() {
			return remark;
		}

		public void setRemark(String remark) {
			this.remark = remark;
		}
	}

}
